Created directive to allow reuse of the tree explorer