Added ability to do local queries on imported XML data, and other minor
edits.