Fixed issue with bounding box cleaning algorithm that was causing the bounding box to be only increased. Now the bounding box is increased and decreased to fit the shape.