Refactor Node::getReducedTree and add tests for Node