Move dispersion code to polynomials module