moved end scripts and navbar into own files