Added downloading and archiving function