Fix edit routes, they need to be outside the module scope