Keep all the state management at the top of the app.