refactored main launcher class