Add basic functionality and tests for addEvents (browser/server)