Better debug output, and can shut off caching if wanted