Got rid of C interface global state
Reduced repetative Lua callbacks