add env var configs, refactor a little
0.5.9