Refactored Rest and Twig Router