Added some more examples to writing states.