Fixed sample data
Added aggregation and quality control functions, with tests