Rewrite each path

Rebased + Fixed version of #7396