Remove unused spans from HTML