Added option for storing normalization information. Added experimental HMM function.