Clean up dependencies, move couchdb services to 'Repositories' class