fixed up SubgraphTest to be more like the other sideEffects. More test cases. Added more helpers (both Element and Memory). Added some TODO notes here and there.