Removing bad code