Added normalization and denormalization. More testing.