Basic query functionality
Factor out sendSimpleQuery
Separate receiving and processing a message