Refactor installer/uninstaller