Make dispatcher a package

Provides a cleaner separation of dispatcher code and cli.