Changed to use an EventEmitter instead.
Updated documentation to be in line with changes.