refactored createMessageCtrl into MessageCtrl