Add a Class for publishing and subscribing events