Added an efficient flyweight factory for message chunking and unit tests.