Added preprocessing function for models, used for normalization.
Bugfix related to previous commit.