Add timestamp to events

Addressed all comments. I didn't know how to modify the previous pull request, so I created a new one.