Batch-renamer code refactor