Small enhancements

- wrappers to conveniently save and load graphs
- code_discovery: option to stop whenever new code segment has been
detected