Abstraction for different kind of results
Added a stupid mutex
Used libzdb for connection pooling