change settings structure, add env variables