Refactor things a bit

- Use binary patterns to show structure of payloads a bit more
- Better delimitation between public and private APIs

This still doesn't fix your bug, though.