Initial work on generating invoices