Move from case class to class with companion