Clean up calculation logic into separate calculator