scala: Migrate to Scala