cleaned some code:
-Added a map with all the data
-Added some error handling
-improved algorithm in Claculate method

Special thanks to /u/Tieryal for the suggestions.