Remove some unless code