Using AngularJS and a few bug fixes