Added many REST type events, plus related unittests.