Update Main.js

full code are been rewrored...
apling txt parser.