code clean; remove circular dependencies; jshint compliant
fix unit tests