Refactoring of routes creation