Write permission docs at the same time
Made generic interface for fetching documents
Used IDocumentFetcher to move functionality out of batch writer
Removed unused fields from DocumentProcessor
Small tidyups