The folk questions in Lorentzian Geometry, which concerns the smoothness of time functions and slicings by Cauchy hypersurfaces, are solved by giving simple proofs of: (a) any globally hyperbolic spacetime $(M,g)$ admits a smooth time function $tau$ whose levels are spacelike Cauchy hyperfurfaces and, thus, also a smooth global splitting $M= R times {cal S}$, $g= - beta(tau,x) dtau^2 + bar g_tau $, (b) if a spacetime $M$ admits a (continuous) time function $t$ (i.e., it is stably causal) then it admits a smooth (time) function $tau$ with timelike gradient $ abla tau$ on all $M$.