Rename max_assignments to assignments; add lots of validations and tests
Allow Events to be re-emitted for testing.