Fixed a bunch of stuff, started rewrite of message parser