moved db connection logic to a separate file: leveldb.js)