cleaning up main.lua