move scripts loading to header