Fetch support.

This supersedes #203.

It looks mostly ready so I'm open to suggestions. It misses tests (again :-S) and documentation.
Yeah, I was so annoyed by the duplication between this and the one above that it just flew above my head :anguished:.