exporting only controller functions to global object