[CB-6024] nopt refactoring + install/uninstall tests