Added unit testing
Added unit testing.

Fixed uncovered bugs.
Some redesign.
Adjusted example Server to handle missing RabbitMQ.