Refactors home.js