Send [] instead of "null" for empty result vectors, fix retrieval tests

There is still one broken operation_test.go test case, but I haven't figured out yet what the problem is. There's a comparison failing in the test, but when I print the two compared elements, they are exactly the same. We need to fix that later.