Kludgey way of making remap into a library function.
Now have the guts of remap in libasf_remap.
Now split out the lib part of remap into libasf_remap