Moved global JS stuff to top in CSS