Fixed PEP8 violations and small mistakes like unused imports

Refactor of the code to make it PEP8 compliant.
Removed unused imports
Added missing imports
Added LICENSE headers for sublimepluginunittestharness in files taken from it