Upgrade all sources to CommonJS; fix