Change the profiler to make it possible to add custom profiler implementations