Added EventEmitter.
Very basic reimplementation of Jakub's demo middleware functions.