Refactoring all code
Implementing messages