More WIP for lua smc.