#10 Manage packets

- manager for messages
- clean up code