Merging protocol changes from this week. Still needs work to integrate the communication layer.