perf: Traverse dom using firstChild instead of childNodes

5% improvement in speed by not using childNodes DOM API.