Finalised Friction Code