Fixed some error handling. Updated test project to use AngularJS.