Remove all places that stdout gets written.

Emit events instead