demo client refactored to work with the new message handling system