~ refactorings and fixing 'emitter#to' missing