[WIP] protocol version

This PR fixes #24. It is still a work in progress, not ready for merge. However it allows for early review and to signal I am working on it.