refactored calculation helpers and added tests

- added new calculation helpers that don't depend on any data or viewmodel objects.
- added tests to ensure new calculations match what is calculated by existing methods.