Changed main.js

Changed grammar and error codes