Added filter to smooth 3d change map. Templated spatial refinement function.