Minor tweaks and re-organization
PEP8, pychecker and whitespace cleanup