added dal

a generic data access layer from querying couchdb