refactor main.js to backbone view