big modifications to DB schema, added hearders tables and details tables