Started refactor to make this whole thing thread safe.  Lots of changing parts right now.