Rename, reorder and cope with no input.