handle EOF in REPL
collapse a lot of tests to be more idiomatic

This one is more of a style thing, but it prevents the array of "goods"
and is more idiomatic.