Move old functions to compat.lua