Refactored to use AngularJS and Bootstrap