Fixed total calculation and comments