asserting valid category in EventStreamInfo constructor
test refactoring
extracted oldEvents and newEvents; made Result a monad