enhancements to common.js