MInimal changes and optimizations to the profilling code.