Remove unused cs and release DD properly