Reorganized the math/formula module.