Moved header js into shared scripts view (allows analytics in error page)
Tidy up