refactor main.nut
fix 8c8fb2554551bfb69fe1ac67fb33882667155c50