Furthered 4. Still doesn't work properly, runs out of memory because of what I suspect is creating a huge power set from all the nodes.