Updated script generator to add Clean Up methods and objects