Beginnings of room merge algorithm