Creating resource class in Lua, to manage loaded resources.