Cleaned some python code