move building config to the config builder, add options validation and default values