Structural changes

Removed QML from themes
General clean up in some functions
Renamed variables to more intuitive names