* Replaced console.log with safe logger
* did some code inspection / jshint cleanup, but NOT going to make 100% clean.