Cleanup some code duplication. This whole parser ugh I just want to rm -rf all of it. Time for GMQCC2.