Refactor HTTP routers