moving initialization of homepage into homepage.js