Broke the install down into functions -- still needs some work - untested