Re-worked script based on new archiving requirements.