Added NaiveResampler, which averages neighbour points, and did some cleanup.