JS Cleanup. Moved DOM interactions into $scope.ui.*