Refactor install