all bility to use callback in message + refactoring

- adds the ability to use callbacks
- refactoring