Update main.lua

Improvements