Added better message parsing