archiving: major refactoring, from prototype to closures
jslint final fixes refs #17382