Made tick() use events.h and renamed the event function