Restructure files. Put parser into its own file, and reorganize the parser bits.