Add functionality and fix bug in XYZ-Renumber