Preprocessing funcs updated (but not tested).