MessengerWindow refactoring