Refactored messages to main