Deleted some old commented out code.
Added the gradient in mode 1.