Fixed method name typo - s/on_order_successful/on_register_successful/. Fixed usage of @message_queue.pop instead of @message.unshift.
Fixed ugly response body format - Now its hash with values that have format resembling that in definition of protocol.
Incorporated changes made to format of responses.
Slighty improved agent.