Ellenberg-Venkatesh-Westerland have a very nice result about realization of abelian $p$-groups as the $p$-part of class groups of certain function fields. All this fits in the general program of studying Cohen-Lenstra heuristics over function fields. One key scheme theoretic player in E-V-W result is a certain type of scheme called Hurwitz scheme. To read great stuff related to all this check: Ellenberg-Venkatesh, Statistics of Number Fields and Function Fields (Proceedings of ICM 2010) Ellenberg-Venkatesh-Westerland http://arxiv.org/pdf/0912.0325 I'm almost sure you've already read this, but just in case https://quomodocumque.wordpress.com/2009/12/12/homological-stability-for-hurwitz-spaces-and-the-cohen-lenstra-conjecture-over-function-fields/