updated error reporting in repl.
doc formatted.