Add hashCode & equals.

Fixes #3