Cleaning up gradient finding functions.