Vedant ffi

Enhanced the performance of FFI.
Created a structure to categorize FFI functions for optimizations.