Turn version and protocol into an `enum`.
Factor out name filter code.
Update makefile with new source files.
Add includes to cpp main.