Merge branch `rewrite` into `master`.
Move network code to Messenger object.