Profiler refactored