script processing and HTML parsing