Improved DOM traverse.
Merge pull request #1 from thomasjohnstapleton/master

Improved DOM traverse.