Revert "Refactor nodes and tree_folders"

This reverts commit 47d69b1181e2978b2acf9f5a368930c0324dccda.