Add group by date to summary. Remove obsolete code