move script enequeuing to controller class