Add normalization and sanity checking