Moved some of the IP identification code around