Move some startup logic into a new class: StartState.