Changing recognizeAnchors to use innerHTML instead of .text and tweaking loop counters