Move some code from init.lua to config.lua