Remove temp smp file.
Move invoices data to invoice factory.