Calculations improvent

Made the calculations a class for code cleanliness
Merge pull request #4 from Berco/master

Calculation improvements