Handling for re-uploading of files, plus code cleanup, such as getting rid of HashMaps in favor of BasicDBObjects for metaData