Refactored Parser

It's definitely not as "clean" as it would have been if I'd designed it
this modular to begin with... but it's a lot better than it was.