Add option to use clustering and specify and adjust ionfactor by frequency.