Give mapState access to before and after states.
Indexed now also has an end index.