Refactor normalize_username