Add forgotten files
Make everything threadsafe and test it