Refactored code so that Scala forks JVM nodes