Refactoring and improving install and remove