Moving logic for ng-genie appearing to the directive rather than the controller.