Fixed bug where entries could get the same ID.
Fixed race condition bug when creating new keys.
Made it possible to lock entries, making them more threadsafe.
Fixed bug with removing closed connections.
Removed comment for fixed bug.