Added threading
Fixed issues with Autoclosable