Minor changes, needs testing for descent functions