Updated HANDLE type in underlying FFI code and added some typedefs.