Adding generic arguments, to make it compatible with 0.9.1.1. Also Changed lines 45 to 52 as they override EventEmitter from node, so also added emit function parameters.