Updated scripts to make install/uninstall more reliable