Added code to compress rows into available space.