restructured parser, code reorg
weird bugs persist