minor config parsing refactor