Add emit_to method and createRoom fix.