Refactor to simplify interface around SocketWriter
Clearer distinction between query / command methods