We develop a new method for analyzing moduli problems related to the stack of pure coherent sheaves on a polarized family of projective schemes. It is an infinite-dimensional analogue of Geometric Invariant Theory. We apply this to two familiar moduli problems: the stack of Λ-modules and the stack of pairs. In both examples, we construct a Θ-stratification of the stack, defined in terms of a polynomial numerical invariant, and we construct good moduli spaces for the open substacks of semistable points. One of the essential ingredients is the construction of higher-dimensional analogues of the affine Grassmannian for the moduli problems considered.