pep8 fixes, except whitespace near '[' and ']'

This code seemed to have a convention of putting whitespace around
square brackets that are used to make lists. This doesn't follow Pep8
but I left it this way since it seemed to be a clear preference of
the original writer.