Initial HTML parsing code