Initialize state.