More tests and fixes in AngularJS scripts