Added patch for event archiving.

Fixes #173.