Simplify the install and uninstall commands and improve tests.