CAP cleanup