did some general python cleaning up stuff