Added extractFromAST method.