guess we can presume that jquery is available
removed global functions for controllers
this is also run through jshint