Clean up the code and py