Refactor installation process