Tweak code, add some comments about new implementation.

The global "warn" function turned out to be solely used by the data-normalization functions, now all residing in normalize-package-data module. Thus, define the whole function locally.