Bounding box optimization.