cleaning up window script