Application ported to AngularJS