minor fixes to dom.js and accuracy enhancements to fuzzy string comparison