Cleaning up fdb_nifs.c and implementing unimplemented calls