Update lua

Just making the code a bit more Lua-ish.
Merge pull request #1 from smarx/patch-1

Update lua