Scala/Compiler: Refactor