Added loading and saving functionality