Refactored glacier upload and added initial implementation of basic restore functionality