reorder functions in repl.cc, get rid of ldb:: for static functions