Refactor install_github