major loose-end tie up in main.c, esp. re: Lua