Add linear interpolation and some tests