Generalised the strut shaving code to make it re-usable