Implemented surface_tilt_levelling and moving_average functions