Scala-ing of the source code, still won't compile