Query codec is now its own impl

Fixes #4, #3, and #2