massive overhaul of Python style