[TASK] Remove old, empty condition statement
[TASK] Performance improvement by re-using existing variable instead of getter
[TASK] Count classes and class types while building tree