smoothProfiles function

Regularise set of profiles