[WIP] Implement core emitter