Clean up some of the old code + PEP8