And removed unused code