Fixes #9.
Fixes #13.
Fixes #14. Accidentally declared class variable.
Fixes #17.
Improves error messages for duplicate event submissions.