Improved internal handling of parameters and syntax of save_model method