Add shallow graph copies
Add shallow subgraphs
Improve longest path search
Fix connection which misses head and tail