refactored application start