Code cleanup & better logging

* Bumped version
* Updated comments
* Working on better logging.
* Cleaned up various code