Move message parsing to Messenger.
Fix/move message handling.
Merge branch `rewrite` into `master`.