Improvements to profiling