Replaced Children loop iteration for the firstChild method