Made memory management slightly less shitty.
FFI implementation using libffi. Added more FFI tests.