message-controllers: refactoring