Refactor: extract module: utils.js