Refactor all routes. Add XML features.