cleaning and added invoice_ids to entries