State and memory

TODO introduction.