Add unit tests for message parsing, add reload support