add more complete type system to Lua, minimizing boilerplate code