Basic implementation of Protobuf-encoding & decoding.
A bunch of clean-up following Protobuf integration