Rename parents array to ancestors
Add check for tagName
Switch to camel case names
Simplify variable declarations in toggleFocus()
Update comments