moved everything to AngularJS