Added a pubsub class called Events to stop using callbacks.