Added setEvents method and cleaned up push method in order to make use of setEvents.