Added exceptions.
Added first version of asMutableState().