refactor os::config into smaller modules