Refactored calculations in TasksCtrl into Calculator