Update processing model to most recent spec + add processing model tests

Depends on #194 #187.

Fixes #173, #148, #110.

This isn't ready to land yet as we need to land the others first and I still need to give it a once over to make sure that the tests are correct.