Config file handling

Resolves #209