improve tool for cleaning up merge maps