Categorical methods in moduli theory