Calculations improvent

Made the calculations a class for code cleanliness