Move config logic into a module

Created by  isagalaev  on October 10, 2021
TYK5XDMD7PSITQFFPHNLD3462EODC3FQIV5DCW5KA527FXIW7CTQC
Change contents