Rewrite generator base