Most of the changes in this file are moving everything to a TernWorker object - namely all the promises around adding files, priming the pump, etc.  By having those live in 1 Object, we can just create and init a new one when we want to kill the worker and start a new one.