Expose handling of EOF.

Involves #34.