Commit of working version of the abstract query code for NL