invoice, payment and inventory class cleanups and fixes