Made the lua cookie res handler a bit more easier to read