Adding hashCode and equals to Contract