major refactoring and added archiver manipulation to REST API