Improvements to profiler