Refactored profiling + added more detailed profiling info