Move more old functions to compat.lua