Refactored startup