break source normalization into util.normalizeInputSource.