WIP: Added message parsing and some error handling.