removed unnecessary old code
fixed jansson memory leaks
fixed jansson memory leaks
fixed issue initializing subscription
forced server to drain queue to avoid backup when no clients are connected