Changed int ParamEqualFM to enum.

Made small refactorings.