Fix archive mistake

Fix a bug (reference to an old API), and some other code cleanups.