Added Lua Resource management.