loads of tests and bugfixes for message parser
loads of tests and bugfixes