Stupidly simple event-emitter implementation