Rework some of the logic for the invoice item tree
Javadoc for the invoice item tree