Refactor the dispatcher. Rename classes and interfaces