Adding methods to save and load the whole model