Replace all tdf cegs with lua version