code cleanup (better adherence to python style guides)