Hook up diagram saving (possibly incorrectly).