Start implementing messages, some refactor