improve repl mode, and add _gc module