Update NodeMain.lua

Major revamp