move mjs repl implementation to its own file