Added cycles detection
This is exactly what one shouldn't do: a mega-commit
Temporarily reverted to Graph&
Greatly reduced the memory footprint