Reduce code a little in model::save()