Fixed graph nodes id comparisons and added equals and clone methods.