Adding new functionality to truncate messages longer than a specified length.  Added tests.