added bz2 as an allowed document type
made the upload of files or urls optional for documents
added a utils module to the base app to hold commonly needed functions