refactor

modified repl so that it wouldn’t let `Exception`s propagate out.

also added ‘open’ to `global_context`