Config file. Refactor and tests.