Added functionality to save and load learner