Removes test messages and adds message trimming