Added messagePasser and refactoring