Metrics added to merge and code refactored

Added metrics to merged documents folder.

Added batch files.

Refactored database connection, DataGeneration now defines a connection
and passes it to each of the constructors for Documents.