New Lua utility functions

Not currently working