Added simple querying code.