Made the xpath queries more uniform