Implementing dynamic tree node instantiating