Modified the calculator code to be flexible and reusable

Or at least easier to reason about each individual piece.
Merge pull request #2 from nhusher/feature/a-glimpse-of-the-future

Modified the calculator code to be flexible and reusable

THanks. Now to start figuring it out