Moved all widget code to AngularJS