Made a more generic event handler adding method that allows for any type of context to be passed into it.