added gradient operator (dilation - erosion); minor tweaks; clean-up comments