Use case class in Scala

Resolves #3
Perhaps should be private.