Refactor main.js; add HomeCtrl to index.html