Reworked with AngularJS