More valid Scala code changes