Basics.- Preliminaries.- Singularities.- Recent advances in the minimal model program.- The main result.- Multiplier ideal sheaves.- Finite generation of the restricted algebra.- Log terminal models.- Non-vanishing.- Finiteness of log terminal models.- Compact moduli spaces of canonically polarized varieties.- Moduli problems.- Hilbert schemes.- The construction of the moduli space.- Families and moduli functors.- Singularities of stable varieties.- Subvarieties of moduli spaces.