Cleaned up graph class