Added (untested) Lua interface

Will test it shortly and commit any needed changes