various cleanup

I ran the 'pychecker' tool over the pcs python files and fixed some of the more obvious things it reported.