Added deceleration. Not fully implemented yet, it needs an offset at close to 0 values.