Make the website agent support merge events

Refactoring the website agent so that it can merge events.
Ignore the above comments, consider the comment below instead.