Try to deal with script loading order again. Simplify.