Calculating the subtotal of the component tasks
Fix bug, referencing wrong variable in calculateTotal