Adding flexibility to API methods

In addition to domain event classes, the public API now accepts
symbols, strings, and a variable number of symbols, strings, and
domain event classes.

Key generation has also been separated out into its own private
class.