Implementing XPath filters + AST modifications