Refactoring to ensure that REPL also works with Scala 2.10.