script script generator, used to help clean up stale states.