routing, router, deleteAll: refactor