Refactoring the update and install method that did exactly the same thing.