Bug fixes for text preview, and added hashing function to cut down on duplicate files for download and including download caching.