cleaning python code and json files