commonJS.js used in makeCustomLayer functionality