Smaller fixes to Profiler and initial version of thread samples