Refactored code to use class filestore and adjusted my functions to use the methods