Preparations for the protocol implementation and for the JSON messages processing, with some code adjustments.