Switch to LevelDB, initial work on crypto stuff