Environment setting updates. Added closure depth calculation to SA.