Adjusted the methods used to save and load a model to file