Rewrote Emitter, added unittests.

Rewrote Emitter to use time instead of frames. Added a few unittests