Lua-like logic

Also with a TI-API 2.0 reference sheet which requires TI-API 1.0 to run