Moving the install process into a definition so that we can call it
multiple times with different parameters.