Clean up utils.js to avoid variable issues