Adds tests for everything except pipe.

- Pipe tests are coming next.
- The emitter.listener event is not the same anymore. it only gives
  you one listener at a time, instead of an array of listeners.
- Also includes various small bug fixes.