Fix: Calculate Terms Tree hierarchy for presentation

Close #495