Lua

This adds a bunch of Lua functions that should be helpful to map authors.