rectangle packing cleanup