move processMessage and hideRoom into factories