Beautify

Ran pylint on most modules. Found a lot of style issue. Removed lots of unused imports. Found a couple of minor bugs. Added the __RCSID__ in many places.