added toggle option to keep nodes when generating graph. also some random bugfixes.