Optimise script load