equals and hashCode methods for DTOs

Fix #123