New message parser, modifications made according to comments