Split mfstool main into the set of classes