Clean up the calculation of total in cart