Added serial version UID to Graph class to prevent serialization issues.