clean emitter setup code