Improving HTML preprocessing