IDEX-1530: added xpath mapping tests, refactored remove procedure