Fixed some bugs.  Also added a cache option to the downloading of files.  Still need to integrate the cache check into the view, but the backend stuff seems to be working OK.  I also haven't added a hash check on the cached files.