clean up a bit of code involving structure bounding boxes and how they
are set from a template