Large rewrite with AngularJS.