Added number formatting, fixed bug in total calc