Important improvement to helpers.dot, working on diff.calculate.