cleaning up graph controller