Moving the helper functions out of init.lua and into a module