Initial implementation of generic state.