Data normalization + some refoctoring
Add a test