Moved the drawing stuff to the emitter