Use case class in Scala

Resolves #3