Issue 96 fix xpath exclusions

Turned out #96 wasn't an issue, just a broken test. While fixing it I refactored/cleaned up some code.