removes un-needed code