Also refactored the directive to remove the dependency on the controller. The ng-model attribute is still required but only to set the scope.