PIM-865 : Clean code for tree view