Moved handling of private messages to a separate class