fixes for method annotations
ffi fixes
tests for prim-num-keys