Moved home controller code to controllers.js