misc changes dealing with various message format exceptions
Added additional data trimming