Completed process test suite, fixed bugs found by said suite.

Flattening was not occuring as expected in raw, there were typos
which successfully parsed and didn't ALWAYS blow up, but they could.
Those have also been fixed. Payload isn't quite fully tested yet.
However, the process_consolidated tests also checked payload value,
so the payload processing is also likely to be correct.