Move Event emitter int emit method
Move default config into separate