Added some thread locking
Fixed installer/uninstaller