Refactor to using bytes.Buffer
Extract txMsg
Refactor getBuf so it no longer needs a size
Query methods sanitize arguments

fixes #18
Remove unreachable panics (Go 1.1 doesn't need them)