Simple xPath look ahead query resolving implemented. Overall improvements.