Created equals and hashCode and wrote core