MessagingController refactoring