Clean up resource root handling.
Fix download bugs.