Modified code to allow for static lifetime objects to be passed to worker thread. This means that we don't need scoped threads which cannot be implemented without unsafe code. The main change here is to pass cloned objects which keep their lifetime vs references.