Improvements over fun.lua