lots of refactoring, trying to settle on a parser design