Protocol interface refactored, merged marshal and packing functionality.