Wrote REPL functions. Relates to #18.