Re-worked the room transition code.