The Epic Math Refactor

Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>
Merge pull request #2166 from DDoSQc/master

The Epic Math Refactor