Refactoring. Now it is possible to use main class separately and independently.
Three input parameters in Main class constructor
-filename
-settings_filename
-output_filename non mandatory