cleanup expand script