Rewrote the application using AngularJS