Finish most of parsing, restructure some things