Enhanced bounding boxes for expanded subanalyses. Introduced two bounding box computation helper functions.