WIP: refactor reply encoding/decoding to proper handle string, int, and bool.