Revert "Tree code"

This reverts commit 3d755af0b9aeffdc21ef997a88ca8a324c75cb0a.