Refactored trecs binary and tests
Refactored MessageRecorder