core: simplify source normalization.