Calculation improvements

Made the calculations a class for code cleanliness