Refactored that again to use declare-graph-fns.