Scala update to make task creation more efficient