[refactor] [minor] Move install code into separate module