Refactor unique values