Added functionality to fix_w_DEM to improve segment end elevations;