Refactored some code, added ERROR and DELETE message types.
0.6.0