Add room assignement function and use code formatter.