Fixed a few memory-related issues
Added methods for only checking the existence of a key in a db instance