Re-factor for simple queue implementation
Added tests for Publisher and Subscriber