major refactoring for launcher