Added automatic running of code from within Scala.