Use Node's built-in inherits and EventEmitter