Updated MainCtrl to define instead of require