Removing tree structure dependency