Refactored startup method