optimized script load order