Migrate and added routes to generator for rewriter.'