Removing unnecessary test code