Implemented normalization and length tests. Added logic to normalize
methods to avoid division by zero.