Profiling can now be controlled from the Logging class

Disabled profiling by default and updated the one place where we are
currently creating a profiler to only do it if profiling is enabled.