Minor refactoring, docstrings.
Use a socket, not stdin, to send input to the eval process.

Then we can have a remote REPL.