started fixing tests and adjusted the invoice manager