Add hashCode and equals
Formatting & code cleanup