move some functions from utils.js to dom.js and string.js