Grade downloads

@sarina: I'm doing a lot of cleanup today and it needs more tests, but I wanted to throw this your way so you could start reviewing the code.