HACK: Db query server delivers entities as Json since they are not
serializable.

Otherwise it works pretty well.

Also:
FIXED issue when closing DB and then attempting to read from it later.