Remap non-locals

Adds support for remapping non-locals