Some further streamlining of Gradient handling code