I think now I see the area for refactoring here :) there should be a function that would just install an app from the package (has some shared installation logic), and both our "Update" and "Install" would use this function.