Refactored normalization code into client API call