Move install code to top