Refactored memdb a bit, cut down on memory usage