Refactored code to save file information in new class. added refresh button to update files