Cleanup c ffi

Just some initial cleanup before working with it.