Final touches on calculation tree sorting.