Understanding polymorph production and control in calcite/aragonite biominerals