Added runtime protocol buffer exception and refactored the varint parsing and serializing methods.