Splitting pull request #45: background profiling code
Merge pull request #51 from musella/matt_bkgprof

Splitting pull request #45: background profiling code