Incorporated Ryan's suggested changes and added a couple tests for vario...

...us archive and delete situations.