[TASK] refactor dispatcher
Merge pull request #40 from madsbrunn/master

Refactor dispatcher