Factor control logic into it's own file.
Throw errors when defined multiple times.
Invoke wrapped events.