XPATH: Substantially refactored xpath tool for new interface.