End-Point Equations and Regularity of Sub-Riemannian Geodesics