Graph ops

Merge into master, for simplicity