Refactoring - home.js