fixed issue 1358, himBH>jQuery, thanks FeDjango
fixed issue 1366, minor rewrite in retrieve, thanks Dominic
fixed CONTAINS (again)
Merge with upstream