Some changed to AngularJS