Added the functionality for messages to be broken into smaller pieces in preparation for adding multithreading.