Implemented some thread-safeness
Some cheshire fixes