Moved MessageCounter to its own file