Add format function to events.

Closes #366
Update events documentation