New messages format and refactoring of MainGui