Improves the readability of the collected arrays in the profiler.
Refactors the code.