appears to be thread safe now. Still need to clean some stuff up and decide if what I'm doing is the best way or not