Routhian mechanics