Repaired scripts so they can work with the object manager.