parse meta headers, parse regions, and factor out parsing of settings