Bit of rewrite
Add highly experimental N1QL support