Improve config parsing and exporting.