massive code cleanup and streamlining in movingobjects gradient facility