Added better garbage collection for Lua
Merge