Splitting the message parsing logic into a new class, MessageParser so it can be tested separately.
Validate checksum when parsing messages.
Adding tests for MessageParser.