VS profiler
Refactored message construction with possible memory leak
Construct and generate sub-messages
minor fix