Implement normalization and sorting for local versions