simplify and fix load scripts