Fixed up dispatch, with some docs, some tests, and Immutable.