Basic message handler implemented

todo:
* handle received data
* handle block messages