adding creating of invoice number and reformating some of the classes