Move config parser to separate module