Move protocol test to tests directory.
Formatting.
Add Makefile.
Implement type-to-size function.
Test sizeoftype.