Overhaul of config parsing.