Fixes #15.  Refactors the launch code to make it easier to add launchers

Refactors the launch code to make it easier to add launchers and make the code more module and less dependent on globals.