Some task refactoring
Refactor routing