Add StateElementMapper which makes it simple to update state field by field.