refactored JS and footer out of home.html.erb