refactor to consolidate relation stuff and added headers and totals
eod checkin