Improved scene loading from a Lua script