Refactor error handling into separate methods
Pass prompt into read from repl
Factor out fix_indentation