Created RequestDispatcherFactory.
Moved dispatching logic to RequestDispatcher.
Some refactoring in the dispatching process.