Cleanup and brush off the ole' code.

 - Fixed pep8 violations
 - Removed unused imports
 - Cleaned up unused or misused variables
Made stylesheet a property and improved some docstrings.