Moved one of Messages

Moved invalidmessages to main class file.