New Script instance code and tests.