   defp wait_input(state, evaluator, evaluator_ref, input) do
     receive do
       {:input, ^input, code} when is_binary(code) ->
-        send evaluator, {:eval, self(), code, state}
+        send(evaluator, {:eval, self(), code, state})
         wait_eval(state, evaluator, evaluator_ref)
+
       {:input, ^input, {:error, :interrupted}} ->
-        io_error "** (EXIT) interrupted"
+        io_error("** (EXIT) interrupted")
         loop(%{state | cache: ''}, evaluator, evaluator_ref)
+
       {:input, ^input, :eof} ->
         stop_evaluator(evaluator, evaluator_ref)
+
       {:input, ^input, {:error, :terminated}} ->
         stop_evaluator(evaluator, evaluator_ref)
+
       msg ->
         handle_take_over(msg, state, evaluator, evaluator_ref, input, fn state ->
           wait_input(state, evaluator, evaluator_ref, input)

    receive do
      {:take, take_pid, take_identifier, take_ref, take_opts} ->
        if allow_take?(take_identifier) do
          send(take_pid, {take_ref, Process.group_leader})
          run(take_opts)
        else
          send(take_pid, {take_ref, nil})


  defp loop(state, evaluator, evaluator_ref) do
    self_pid = self()
    counter = state.counter
    prefix = if state.cache != [], do: "...", else: state.prefix

    input = spawn(fn -> io_get(self_pid, prefix, counter) end)
    wait_input(state, evaluator, evaluator_ref, input)
