dont depend on angularjs and some cleanup