Refactor bemhtml@leveldb