Clean up. Make fetch and list work.

This is in an almost-usable state now.