Kernel Density and IDW Interpolation refactored.