When writing templates the <head> tag is always in the main template file. If this goes in it now have multiple head tags. It might work I'm not sure but it is not proper. Your using it for CSS and JS. put these in their own files. .css and .js files and link them in.