refactoring services, better tests for invoice, better system decomposition