Lua integration patch. Current problem with the Lua side ebing unable to dereference pointers that are passed to it.