reformat main.js
use return instead of else to improve readability
reformat gulp file