Code cleanup

* Unified naming convention
* Minor fixes and tweaks