[TASK] separate live and history couchdb import and refactor