correctly compare dates/strings
more helpful exceptions; better totals calculation in the API