included start of master parser; please ignore the thousands of annoying debug prints.