Removed code duplication in config readers