Adding @DavidSouther version of the Dispatcher into facebook's.

Still needs some cleaning up and more tests. It's a start.