First cut at median filter