Some cleanups

* Removed unused imports
* Reduce code length
* Improve readability
Cleanup: Use reverse instead of hardcoded URLs
Cleanups from landscape.io report

Missing imports, unnecessary imports, indents, comments...