Fixed leveldb disaster. Should've started fresh new branch for this