cleaned up extraneous whitespace, even for python

also added more comments