Adding state structure.
- Including adding tests.