refactored LineServer, beginning integrating leveldb