Changed to use an EventEmitter instead.

This ends up being much cleaner and simpler. This ended up needed version 2 since it works completely differently but I think this is the right way to go.