Also changed instances of `var is None` to `var == None`, and replaced `var.replace('http%3A', 'http:')` with a regex