@starsirius: invoice management

I also tried to alphabetize the `require`s and `include`s, as they were getting unwieldy. Sorry about the big diff.