Refactor of Precalc for Agros to work.