Added custom HTML formatters
Better handling of totals