CHanges to support LevelDB

Code changes to support LevelDB