Scripts loading improvements