Added the MathUtilities service, removed all unnecessary calculations from the controllers