moved the alerts and js to bottom of pages/html files