Refactor Scala language class.