Refactoring: split code to several files
Refactor settings execution