refactor functions from core into archive-creator module