Housekeeping:
* Fix code for jshint
* Fix tests for karma
* Remove a few debug stmts