Cleanroom implementation of the CC API in Lua