Fixing up Message parsing and adding tests.