Normalization helper functions and test file