Split mfstool main into the set of classes

Split mfstools main functionality into the classes