Graph work and bug fixes