General tidy up.

* Removed python bytecode inhibitor, it caused issues
* Improved comment and code style
* Tidied code