Using case class instead of class + companion object.