Got rid of JQuery ref to fix missing ng-function problems