Update Graph

Updated graph class with some changes I made.