Pulling a bunch of the install script out in to functions