Move internal config parser to a separate file