Use to-object-id more in model.

This fixes some more bugs. Yay!
Rewrite cadence validation.
Redo state/compute.
Use renamed cadence? validator.
Add tests for state and validators.