Added a few more test cases, bug fixes, added toNative() to cursors.