Restructures page js asset loading to footer