Fo #1340: use case class to provide hash and equality