Cleanup in HTMLTree, some optimizations in StringUtils.