Split out installation logic