Main Edits

more edits of the main.lua file