Lots of work on passing config options and refactoring. See conversation in #3.
Adds configuration options and event options.