make things a bit more Python-y, fix some spacing