Added some basic Lua API functions