Fixed bug in calculating the total when clicking the done button and reorganized files